import 'package:flutter_utils_plus/core/moment.dart';

void testMoment() {
  print(Moment().format());
  print(Moment.utc().format());
  print(Moment().unix());
  print(Moment().toUtc().format());
  print(Moment.utc().toLocal().format());
  print(Moment().toDate());
  print(Moment().format('YY'));
  print(Moment().format('YYYY-MM'));
  print(Moment().format('YYYY/MM/DD'));
  print(Moment().format('YYYY/MM/DD hh:mm:ss'));
  print(Moment().format('YYYY/MM/DD hh:mm:ss A'));
  print(Moment().subtract(Duration(hours: 1)).format('YYYY-MM-DD HH:mm:ss'));
  print(Moment().format('YYYY-MM-DD HH:mm:ss'));
  print(Moment().add(Duration(hours: 1)).format('YYYY-MM-DD HH:mm:ss'));
  print(Moment().isBefore(Moment().subtract(Duration(seconds: 5))));
  print(Moment().isAfter(Moment().subtract(Duration(seconds: 5))));
  print(Moment('2025-10-01').isBefore(Moment('2025-10-01')));
  print(Moment('2025-10-01').isAfter(Moment('2025-10-01')));
  print(Moment('2025-10-02').isBetween(Moment('2025-10-01'), Moment('2025-10-03')));
  print(Moment.duration(Duration(seconds: 3000661), 'DD天HH小时mm分钟'));
  print(Moment('2025-10-01').isSame(Moment('2025-10-02'), 's'));
  print(Moment('2025-10-01').format());
  print(Moment('2025-10-01').toUtc().format());
  print(Moment('2025-10-01').toLocal().format());
  print(Moment.utc('2025-10-01').toLocal().format());
  print(Moment.duration(Moment('2025-10-01 01:23:45').difference(Moment('2025-10-02')), 'HH小时mm分钟ss秒'));
}
